<?php
/**
 *  view: edit_gallery
 *  file: profile/edit_gallery.php
 */
//$user_name = ( $user['name']!="" )?$user['name']:$user['username'];
$user_name = $user['username'];
?>

  <div id="f_main">
 	<div class="f_container">
    
    <h3>
      <?php 
      if( true == $user['is_online'])
        echo "<span class='online' title='Online'></span>";
      else
        echo "<span class='offline' title='Offline'></span>";
      ?>
      <?php echo( $user['name']!="" )?$user['name']:$user['username']; ?> (<?php echo $user['age']; ?>)
    </h3>
    <div class="block-left">
    	<?php if( NULL != $main_image ){ ?>
    	<img class="profil" id="profile-image" src="<?php echo base_url(); ?>profile/image/small/<?php echo $user['id'] .'/'. $main_image; ?>" alt="<?php echo $user_name; ?>" />
        <?php } else { ?>
        <img class="profil" id="profile-image" src="<?php echo base_url(); ?>img/no_image.gif" alt="" />
        <?php } ?>
        
        <?php if( $admin_edit == false ){ ?>
        <p><a class="link-edit" href="<?php echo base_url(); ?>profile/edit-profile.htm"><?php echo lang('edit_profile'); ?></a></p>
        <?php } else { ?>
        <p><a class="link-edit" href="<?php echo base_url(); ?>profile/edit-profile/<?php echo $user['id']; ?>.htm"><?php echo lang('edit_profile'); ?></a></p>
        <?php } ?>
        <div class="baloon"></div>
        <div class="about-me">
        <p><span><?php echo lang('flirtyy_profile_text'); ?> </span><?php echo $user['flirt_text']; ?></p>
        </div>
    </div><!--end block-left-->
    <form name="profile-form" id="profile-form" method="post"  >  
    <div class="block">
      
    	<h4><?php echo lang('photo_gallery'); ?></h4>
        
        <div id="response"></div><!-- Show  errors -->
        <div class="clr"></div>
        <p><?php echo lang('add_new_photo'); ?>: <input type="file" data-url="<?=base_url()?>ajax/upload_image/<?php echo $user['id']; ?>" name="img" id="upload_img" class="fileupload" ></p>     
        <div class="profil-gallery" id="gallery_items">
        <?php 
        
        $this->load->view('profile/part/edit_gallery_items'); 
        
        ?>             
        </div><!--end profil-gallery-->
         
        
        
        <div class="clr"></div>        
        <div id="wait" class="hide"><img src="<?php echo base_url(); ?>img/loading.gif"/> <?php echo lang('wait'); ?></div>
        <div class="clr"></div>
           <!-- <input class="save" name="" type="button" value="Guardar cambios"> -->
        <div class="clr"></div>
    </div><!--end block-->
    </form>
    <div class="block-right">
    	<div class="side-module">
        
            <?php $this->load->view('modules/my_favorites'); ?>
          
        </div><!--End side-module-->
        <div class="basic-module">
          
            <?php $this->load->view('modules/whos_viewed_your_profile');  ?>
        
        </div><!--End basic-module-->
        <div class="side-module">
        
            <?php $this->load->view('modules/my_friends');  ?>
          
        </div><!--End side-module-->
    </div><!--end block-right-->
    </div><!--end f_container-->
 </div><!--end f_main-->
 <div class="clr"></div>


